<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=yes">
    <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>企业现场检查</title>
    <link rel="stylesheet" type="text/css" href="${ctxStatic}/ajz/mobile/css/iconfont.css?Timestamp=${Timestamp}">
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/sf.css?Timestamp=${Timestamp}"/>
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/aqsc.css?Timestamp=${Timestamp}"/>
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/mobile/css/checkbox.css?Timestamp=${Timestamp}"/>
    <script src="${ctxStatic}/ajz/mobile/js/jquery.min.js?Timestamp=${Timestamp}"></script>
    <script src="${ctxStatic}/ajz/mobile/laydate/laydate.js?Timestamp=${Timestamp}"></script>
    <style type="text/css">
        .table_text_box::-webkit-input-placeholder {
            color: #999;
            font-size: 14px;
            text-align: left;
        }

        .navbtn {
            width: 20%;
        }

        .switch_Box_p li {
            width: 29%;
            padding: 0px;
        }

        .switch_Box_p {
            margin-left: 4.1%;
        }

        .switch_box {
            margin-top: 5px;
            margin-left: -3px;

        }
        .li_ins_txta textarea {
            width: 55%;
        }
        #select_yihanwT {
            width:16%;
            float:left;
            position: relative;
            top: 13px;
        }
    </style>
</head>
<body>
<form action="recordCommit" method="post" name="recordCommit" id="recordCommit" enctype="multipart/form-data">

    <!-时间戳-->
    <input type="hidden" name="starTime" value="${starTime}">

    <input type="hidden" name="tableType" value="${tableType}">

    <input type="hidden" name="id" value="${ajzCompanyInfo.id}">
    <input type="hidden" name="hotelDzqm" id="hotelDzqm">
    <input type="hidden" name="staffDzqm" id="staffDzqm">
    <input type="hidden" name="staffDzqm2" id="staffDzqm2">
    <input type="hidden" name="checkBoxCount" id="checkBoxCount">
    <input type="hidden" name="checkCount" id="checkCount">
    <div class="inves_box_shax"></div>
    <div class="bordar_box">
        <div id="home" class="bordar_box_n" tag="home" tin="20%">
            <ul class="table_information">
                <li><i>单位名称：</i><b><input type="type" name="enterpriseName"
                                          value="${ajzCompanyInfo.enterpriseName}" class="table_text_box"></b>
                </li>
                <li><i>法人：</i><b><input type="type" name="legalPerson" value="${ajzCompanyInfo.legalPerson}"
                                        class="table_text_box"></b></li>
                <li><i>联系人：</i><b><input type="type" name="contactPerson"
                                         value="${ajzCompanyInfo.contactPerson}" class="table_text_box"></b>
                </li>
                <li><i>联系电话：</i><b><input type="type" name="contactPersonTel"
                                          value="${ajzCompanyInfo.contactPersonTel}"
                                          class="table_text_box"></b></li>
                <li><i>单位地址：</i><b><input type="type" name="addr" value="${ajzCompanyInfo.addr}"
                                          class="table_text_box"></b></li>
                <li><i>员工数量：</i><b><input type="type" name="empCount" value="${ajzCompanyInfo.empCount}"
                                          class="table_text_box"></b></li>
                <li><i>企业类型：</i><b><input type="type" name="enterpriseType"
                                          value="${ajzCompanyInfo.enterpriseType}" class="table_text_box"></b>
                </li>
                <li><i>经营范围：</i><b><input type="type" name="buinessContent"
                                          value="${ajzCompanyInfo.buinessContent}" class="table_text_box"></b>
                </li>
                <li><i>企业面积：</i><b><input type="type" name="area" value="${ajzCompanyInfo.area}"
                                          class="table_text_box"></b></li>
                <li><i>年产值：</i><b><input type="type" name="yearValue" value="${ajzCompanyInfo.yearValue}"
                                         class="table_text_box"></b></li>
            </ul>
            <hr class="line_hr">
            <div class="btn_box_b">
                <a href="javascript:history.go(-1);" class=" xgbtn_a_3 btn_box_b_a_line">退出</a>
                <a href="javascript:;" class=" xgbtn_a_3 btn_box_b_a_line table_next_btn_next"
                   onclick="tab_a2_c()">下一步</a>
            </div>
        </div>
        <div id="related" class="bordar_box_n" tag="related" tin="40%">
            <h3 class="qy_t"><span class="qy_ba">&nbsp;</span> 隐 患 复 查</h3>
            <h5 id="imgh5_1">上次检查记录
                <span id="dcl_title">待处理</span>
            </h5>
            <ul class="table_photo_min" style="overflow:auto; height: auto;" id="updateimg">
                <div class="inves_edit_1_box_content Tinde_box_content">
                    <div class="inves_edit_b_box1">
                        <!--责令项-->
                            <% var i=1;
                            if(!isEmpty(orderList)){ %>
                                <h6 style="font-size:14px;color:#f66464;">责令项</h6>
                            <% for(content in orderList){
                                if(content!=null){
                            %>
                                    <div class="fc_box">
                                        <span>${i}、${content.problem}</span>
                                        <input type="checkbox" name="checkbox_Taza" class="checkbox_inves_right" id="cT${contentLP.index}">
                                    </div>
                            <%i++; }} } %>

                        <!--整改项-->
                            <% var j=1;
                            if(!isEmpty(rectofication)){ %>
                                <h6 style="font-size:14px;color:#f66464;">整改项</h6>
                            <% for(content in rectofication){
                                if(content!=null){
                            %>
                                <div class="fc_box">
                                    <span>${j}、${content.problem}</span>
                                    <input type="checkbox" name="checkbox_Taza" class="checkbox_inves_right" id="cT${contentLP.index}">
                                </div>
                            <%j++;}} } %>

                            <!--如果两项都为空-->
                            <% if(isEmpty(orderList)&&isEmpty(rectofication)){ %>
                                <b style=" text-align: center;width: 100%;margin-left:0%;color:#8a8a8a;font-weight:100;margin-left:35%;">没有更多数据~</b>
                            <% } %>
                    </div>
                </div>
            </ul>

            <%
            if(!isEmpty(ckls)){
            %>
            <h5 id="imgh5_1">上次检查点照片
                <a class="iconfont icon-jian1 table_photo_min_add_1 " id="tp_2"></a>
                <a class="iconfont icon-add table_photo_min_add_1 " id="tp_3"></a>
            </h5>
            <ul class="table_photo_min" id="updateimg">
                <ol>
                    <div style="">
                        <div id="upBox">
                            <div id="imgBox3">
                                <%
                                for(content in ckls){
                                %>
                                <div class="imgContainer"><img src="/userfiles/${content}"
                                                               onclick="imgDisplay(this)"><span
                                        class="fontfamily Tin-cha">0</span></div>
                                <%
                                }
                                %>
                            </div>
                        </div>
                    </div>
                </ol>
            </ul>
            <%
            }
            if(!isEmpty(dgls)){
            %>

            <h5 id="imgh5_1">上次隐患点照片
                <a class="iconfont icon-jian1 table_photo_min_add_1 " id="tp_2"></a>
                <a class="iconfont icon-add table_photo_min_add_1 " id="tp_3"></a>
            </h5>
            <ul class="table_photo_min" id="updateimg">
                <ol>
                    <div style="">
                        <div id="upBox">
                            <div id="imgBox3">
                                <%
                                for(content in dgls){
                                %>
                                <div class="imgContainer"><img src="/userfiles/${content}"><span
                                        class="fontfamily Tin-cha">0</span></div>
                                <%
                                }
                                %>
                            </div>
                        </div>
                    </div>
                </ol>
            </ul>
            <%
            }
            %>


            <hr class="line_hr">
            <div class="btn_box_b">
                <a href="javascript:;" class=" xgbtn_a_3 btn_box_b_a_line table_next_btn_back"
                   onclick="tab_a1_c()">上一步</a>
                <a href="javascript:;" class=" xgbtn_a_3 btn_box_b_a_line table_next_btn_next"
                   onclick="tab_a3_c()">下一步</a>
            </div>
        </div>
        <div id="intro" class="bordar_box_n" tag="intro" tin="60%">
            <h3 class="qy_t"><span class="qy_ba">&nbsp;</span> 隐 患 记 录</h3>
            <ul class="table_inspect">
                <div class="switch_Box_p" id="wege501_1">
                    <%
                    for(entry in danModel){
                    var key = entry.key;
                    var value = entry.value;
                    var index = entryLP.index;
                    %>

                    <li class="textbox" id="textbox${index}">        <!-- textbox1 id 这里要累加 -->
                        <input type="hidden" value="0" name="" class="text_box_hid">
                        <span class="switch_box_span">${key}<br>
                            <div class="switch_box box_1">
                                <input type="checkbox" class="switch_1 aqsc_che_list">
                            </div>
                        </span>

                        <div class="inves_edit_box">
                            <div class="inves_edit_box_content">
                                <%
                                for(content in value){
                                %>

                                <div class="inves_edit_b_box">
                                    <input type="checkbox" name='wg520' class="checkbox_inves">
                                    <input type="hidden" name="title" value="${key}">
                                    <span>${content.content}</span>
                                </div>
                                <%
                                }
                                %>

                                <div class="inves_edit_b_btnbox">
                                    <div class="inves_btnbox">
                                        <strong>
                                            <input type="button" name="${index}" value="确定"
                                                   class="table_inves_btn inves_edit_box_btn"> <!-- name 这里要累加 -->
                                        </strong>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>
                    <%
                    }
                    %>
                </div>

                <li>
                    <i>整改期限：</i><b>
                    <input type="radio" name="deadLine" value="0" class="ins_radio" checked="checked">无&nbsp;
                    <input type="radio" name="deadLine" value="7" class="ins_radio">7天&nbsp;
                    <input type="radio" name="deadLine" value="15" class="ins_radio">15天&nbsp;
                    <input type="radio" name="deadLine" value="30" class="ins_radio">30天&nbsp;
                    <input type="radio" name="deadLine" value="10" class="ins_radio set_time">自定&nbsp;</b>
                </li>
                <li class="laydate_Box_tin"><i>选择日期：</i><b><input placeholder="点击选择或手动输入" class="laydate-icon" onclick="laydate()"></b></li>

                <li>
                    <h5 id="imgh5_1">检查记录
                        <span id="dcl_title">隐患状态</span>
                    </h5>
                </li>
                <div id="txtbox_auto">

                    <%
                    for(content in ajzChecks){
                        if(content.checkStatus =="1" || content.checkStatus =="2"){
                    %>
                    <li id="cT${contentLP.index}a" class="li_ins_txta invs_a_li_box"><i>${content.dangerType}：</i>
                        <textarea name="problem" class="text_t_con1">${content.problem}</textarea>
                        <input type="hidden" name="dangerType" value="${content.dangerType}">
                        <%
                        if(content.checkStatus=="2"){
                        %>
                        <input type="hidden" name="checkStatus" value="4">
                        <%
                        }else{
                        %>
                        <input type="hidden" name="checkStatus" value="${content.checkStatus}">
                        <%
                        }
                        %>
                    <%
                        }
                    }
                    %>
                </div>


                <%
                for(entry in danModel){
                var key = entry.key;
                var value = entry.value;
                var index = entryLP.index;
                %>
                <div id="inves_edit_box_btn${index}"></div>
                <%
                }
                %>

                <div id="li_nus">
                    <li class=" li_ins_txta invs_a_li_box"><i>其他隐患：</i>
                        <textarea name="problem" class="text_t_con1"></textarea>
                        <input type="hidden" name="dangerType" value="其他隐患">
                        <select name="checkStatus"  class="select_yihanwT" id="select_yihanwT">
                            <option value="0" selected="selected">已整改</option>
                            <option value="1" class="se_yihuanwT_opse">待整改</option>
                            <option value="2" class="se_yihuanwT_opse">需责令</option>
                        </select>
                </div>
                <div class="btn_box_bgcolor">
                    <a class=" xbtn_1_greed" id="li_add"
                    >添加</a>
                    <a class=" xgbtn_a_3" id="li_deled">删除</a>
                </div>
            </ul>
            <hr class="line_hr">
            <div class="btn_box_b">
                <a href="javascript:;" class=" xgbtn_a_3 btn_box_b_a_line table_next_btn_back"
                   onclick="tab_a2_c()">上一步</a>
                <a href="javascript:;" class=" xgbtn_a_3 btn_box_b_a_line table_next_btn_next"
                   onclick="tab_a4_c()">下一步</a>
            </div>
        </div>
        <div id="gift" class="bordar_box_n" tag="gift" tin="80%">
            <h3 class="qy_t"><span class="qy_ba">&nbsp;</span> 相 关 图 片</h3>
            <h5 id="imgh5_1">检查点照片
                <a class="iconfont icon-jian1 table_photo_min_add_1 " id="tp_2"></a>
                <a class="iconfont icon-add table_photo_min_add_1 " id="tp_3"></a>
            </h5>
            <ul class="table_photo_min" id="updateimg">
                <ol>
                    <div style="">
                        <div id="upBox">
                            <div id="inputBox1" onclick="updateImg(this)">
                                上传
                            </div>
                            <div id="imgBox1">
                            </div>
                        </div>
                        <!--用于存放上传到服务器的图片值-->
                        <!--<input type="hidden" name="danUrls" id="danUrls">-->
                    </div>
                </ol>
            </ul>

            <h5 id="imgh5_1">隐患点照片
                <a class="iconfont icon-jian1 table_photo_min_add_1 " id="tp_2"></a>
                <a class="iconfont icon-add table_photo_min_add_1 " id="tp_3"></a>
            </h5>
            <ul class="table_photo_min" id="updateimg">
                <ol>
                    <div style="">
                        <div id="upBox">
                            <div id="inputBox2" onclick="updateImg(this)">
                                上传
                            </div>
                            <div id="imgBox2">
                            </div>
                        </div>
                        <!--用于存放上传到服务器的图片值-->
                        <!--<input type="hidden" name="checkUrls" id="checkUrls">-->
                    </div>
                </ol>
            </ul>
            <hr class="line_hr">
            <div class="btn_box_b">
                <a href="javascript:;" class=" xgbtn_a_3 btn_box_b_a_line table_next_btn_back"
                   onclick="tab_a3_c()">上一步</a>
                <a href="javascript:;" class=" xgbtn_a_3 btn_box_b_a_line table_next_btn_next"
                   onclick="tab_a5_c()">下一步</a>
            </div>
        </div>
        <div id="feedback" class="bordar_box_n" tag="feedback" tin="100%">
            <h3 class="qy_t"><span class="qy_ba">&nbsp;</span> 签 字 提 交</h3>
            <ul class="table_inspect">
                <li><i>记录时间：</i><b>${starTime}</b></li>
                <li><i>记录人员：</i><b>${user.userName}</b></li>
                <li><i>证件号：</i><b>${user.phone}</b></li>
                <li><i>执法人员：</i>
                    <b>
                        <input name="lawWorker" class="table_text_box_array" placeholder="手动输入请用空格隔开" value="" type="text">
                        <input type="button" name="" class="table_edit_btn stadd_array" id="">
                        <div class="table_1_box" id="" style="top:750px;">
                            <%
                            if(!isEmpty(userList)){
                            for(user in userList){
                            %>
                            <input type="checkbox" class="table_staff_1" name="zfry_che"><span>${user.refName} </span>
                            <%
                            }}
                            %>
                            <div class="table_staff_btnbox">
                                <input type="button" value="确定" class="table_staff1_btn1" id="table_zfry_btn">
                            </div>
                        </div>
                    </b>
                </li>

                <li><i>陪同人员：</i>
                    <b><input name="otherWorker" class="table_text_box_array" style="" placeholder="手动输入请用空格隔开"
                              value="" type="text">
                        <input type="button" name="" class="table_edit_btn stadd_array" id="">
                        <div class="table_1_box " style="top:750px;">
                            <%
                            if(!isEmpty(userList)){
                            for(user in userList){
                            %>
                            <input type="checkbox" class="table_staff_1" name="zfry_che"><span>${user.refName} </span>
                            <%
                            }}
                            %>
                            <div class="table_staff_btnbox">
                                <input type="button" value="确定" class="table_staff1_btn1">
                            </div>
                        </div>
                    </b>
                </li>
            </ul>

            <div class="canvar_bor canver_height">
                <h5 id="imgh5_3">被检查人签字</h5>
                <div class="canvas_n_box">
                    <iframe src="${ctxStatic}/ajz/mobile/canvas/canvas1.html?time=7" class="iframebox" id="iframebox1"
                            name="ifram_user" vspace="0" hspace="0" marginheight="0" marginwidth="0"
                            framespacing="0"
                            scrolling="no"></iframe>
                    <div id="imgh5_canvs">
                        <img src="${ctxStatic}/ajz/mobile/img/user_can1.png">
                        <a href="#tp_if1_abox" onclick="" class="canvas_btn_sava">存保</a>
                    </div>
                </div>
                <div class="hi_degbtnbar_iup btn_box_bgcolor">
                    <input type="button" name="" value="点击签字" class="table_inves_btn4 canvas_click_btn">
                </div>
                <div class="c_imgbox">
                    <img src="" class="canvar_imgbox" id="canvas1">
                    <a name="tp_if1_abox"></a>
                </div>
            </div>

            <div class="canvar_bor">
                <h5 id="imgh5_3">工作人员签字</h5>
                <div class="canvas_n_box canvas_staff_box1">
                    <iframe src="${ctxStatic}/ajz/mobile/canvas/canvas2.html" class="iframebox" id="iframebox1"
                            name="ifram_user" vspace="0" hspace="0" marginheight="0" marginwidth="0"
                            framespacing="0"
                            scrolling="no"></iframe>
                    <div id="imgh5_canvs">
                        <img src="${ctxStatic}/ajz/mobile/img/user_can1.png">
                        <a href="#tp_if1_abox2" id="canvas_staff_btn_sava1" class="canvas_staff_sava">存保</a>
                    </div>
                </div>
                <div class="canvas_n_box canvas_staff_box2">
                    <iframe src="${ctxStatic}/ajz/mobile/canvas/canvas3.html" class="iframebox" id="iframebox1"
                            name="ifram_user" vspace="0" hspace="0" marginheight="0" marginwidth="0"
                            framespacing="0"
                            scrolling="no"></iframe>
                    <div id="imgh5_canvs">
                        <img src="${ctxStatic}/ajz/mobile/img/user_can1.png">
                        <a href="#tp_if1_abox2" id="canvas_staff_btn_sava2" class="canvas_staff_sava">存保</a>
                    </div>
                </div>
                <div class="hi_degbtnbar_iup2">
                    <p id="canvar_imgbox1">
                        <input type="button" name="" value="工作人员签字（1）" class="canvas_staff_btn1" id="">
                        <img src="" class="canvar_imgbox_satdd1" id="canvas2">
                        <a name="tp_if1_abox2" class="canvar_imgbox_satdd_text1"></a>
                    </p>
                    <p id="canvar_imgbox2">
                        <input type="button" name="" value="工作人员签字（2）" class="canvas_staff_btn2" id="">
                        <img src="" class="canvar_imgbox_satdd2" id="canvas3">
                        <a name="tp_if1_abox2" class="canvar_imgbox_satdd_text3"></a>
                    </p>
                </div>
            </div>
            <hr class="line_hr">
            <div class="btn_box_b" style="margin-bottom:60px;">
                <a href="javascript:;" class=" xgbtn_a_3 btn_box_b_a_line table_next_btn_back"
                   onclick="tab_a4_c()">上一步</a>
                <a href="javascript:void(0)" class="xgbtn_a_4 btn_box_b_a_line" onclick="VerifyAndsubmit('recordCommit')">提 交</a>
            </div>
        </div>
    </div>


    <div class="footer">
        <div id="navbar">
            <div id="dash"></div>
            <div id="progress"></div>
            <div id="navbtns" class="container">
                <div class="navbtn" onclick="tab_a1_c()">
                    <a href=" " id="tab_a1">
                        <img id="img_home" src="${ctxStatic}/ajz/mobile/img/home.png" alt="" class=""
                             style="width:30px;top:0px;">
                        <div class="fppter_icons_font" style="line-height:20px;font-size:14px;">基础信息</div>
                    </a>
                </div>
                <div class="navbtn" onclick="tab_a2_c()">
                    <a href="javascript:;" id="tab_a2">
                        <img id="img_related" src="${ctxStatic}/ajz/mobile/img/related.png" alt="">
                        <div class="fppter_icons_font">上次检查</div>
                    </a>
                </div>

                <div class="navbtn" onclick="tab_a3_c()">
                    <a href="javascript:;" id="tab_a3">
                        <img id="img_intro" src="${ctxStatic}/ajz/mobile/img/intro.png" alt="">
                        <div class="fppter_icons_font">隐患问题</div>
                    </a>
                </div>
                <div class="navbtn" onclick="tab_a4_c()">
                    <a href="javascript:;" id="tab_a4">
                        <img id="img_gift" src="${ctxStatic}/ajz/mobile/img/gift.png" alt="">
                        <div class="fppter_icons_font">图片上传</div>
                    </a>
                </div>
                <div class="navbtn" onclick="tab_a5_c()">
                    <a href="javascript:;" id="tab_a5">
                        <img id="img_feedback" src="${ctxStatic}/ajz/mobile/img/feedback.png" alt="">
                        <div class="fppter_icons_font">签字提交</div>
                    </a>
                </div>
            </div>
        </div>
    </div>
</form>
<%
include("/layouts/mask.html"){}
%>
</body>
<script src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js?Timestamp=${Timestamp}"></script>
<script src="${ctxStatic}/ajz/mobile/js/wxpic.js??Timestamp=${Timestamp}" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="${ctxStatic}/ajz/mobile/js/sf.js?Timestamp=${Timestamp}"></script>
<script type="text/javascript" src="${ctxStatic}/ajz/mobile/js/aqsc.js?Timestamp=${Timestamp}"></script>
<script>

    wx.config({
        debug: false,
        appId: '${appId}',
        timestamp: '${timestamp}',
        nonceStr: '${nonceStr}',
        signature: '${signature}',
        jsApiList: [
            'chooseImage',
            'previewImage',
            'uploadImage',
            'downloadImage',
            'scanQRCode'
        ]
    });

    /*给图片上传绑定动态按钮*/
    function updateImg(tin) {
        var btnId = $(tin).next().attr('id');//获取当前元素的下一个元素
        upload(btnId);
    }


    function getPicMsg() {
        var pic = $("#danUrls").val();

        if (pic == "" || pic == null) {
            alert("请上传图片");
            return false;
        }
        $.ajax({
            url: "getBLiscenseMsg",
            type: "POST",
            data: "pic=" + pic,
            dataType: "json",
            success: function (result) {
                var list = result.words_result;
                console.log(list);
                //营业执照信息插入输入框
                var enterpriseName = list["单位名称"].words;
                var chargePerson = list["法人"].words;
                var enterpriseId = list["社会信用代码"].words;
                var regriterDate = list["成立日期"].words;
                var regriterCapital = list["注册资本"].words;

                $('#enterpriseName').val(enterpriseName);
                $('#chargePerson').val(chargePerson);
                $('#managerPerson').val(chargePerson);
                $('#enterpriseId').val(enterpriseId);
                $('#registerCapital').val(regriterCapital);
                $('#registerDate').val(regriterDate);

                checkEnterpriseName();
            }
        });
    }
</script>

</html>